package cn.demoxy.service;

import cn.demoxy.model.dto.DemoTableDTO;
import cn.demoxy.model.entity.DemoTable;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;
import java.sql.SQLException;
import java.util.List;

/**
 * @auther demo
 * @date 2022/6/2 11:41
 * 数据源表业务层
 */
public interface IDemoTableService extends IService<DemoTable> {
    /**
     * 根据数据库配置查询所有表信息
     *
     * @param tableDTO
     * @return
     */
    IPage<DemoTable> selectAllTablesByDataBase(DemoTableDTO tableDTO) throws SQLException;

    /**
     * 代码生成下载
     *
     * @param tableDTO
     * @throws FileNotFoundException
     * @throws UnsupportedEncodingException
     */
    void codeGenerator(DemoTableDTO tableDTO) throws FileNotFoundException, UnsupportedEncodingException;
}
